<?php
namespace app\controllers;

use app\services\TanxManageService;
class TanxManageController extends AuthController
{
    public $currentHeader = 'header-operation';
    public $currentNav = 'tanx-nav';
    public $pageTitle = '';

    public function actionList() {
        $this->pageTitle = 'Tanx客户列表';
        return $this->show();
    }

    public function actionGetTanxAdsList() {
        $this->service->getTanxAdsList();
        $data = $this->service->getTanxAdsList();
        $this->jsonReturn(['data' => $data]);
    }
    public function actionImportData() {
        $result = $this->service->getImportData();
        if (is_array($result)) {  
            $result = $this->service->getRef($result);
            $this->OK('文件上传成功！', 'ok', $result);
        }
        $this->NG($result);        
    }
}// end of advertiser controller declaration
